package com.marry.business.service.user.impl;

import com.marry.business.repository.user.UserRepository;
import com.marry.business.service.user.UserService;
import com.marry.contract.vo.SysUser;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

import javax.annotation.Resource;

/**
 * @path：com.marry.service.impl.UserServiceImpl.java
 * @className：UserServiceImpl.java
 * @description：用户信息
 * @author：杨超
 * @dateTime：2020/10/29 10:41
 * @editNote：LiuYun 2021/07/04 22:18:23
 */
@Slf4j
@Service
public class UserServiceImpl implements UserService {

    @Resource
    private UserRepository userRepository;

    @Override
    public Mono<SysUser> findByUsername(String userName) {
        return userRepository.findByUserName(userName);
    }

    @Override
    public Flux<SysUser> findAll() {
        return userRepository.findAll();
    }

}
